From: Giovanni Campagna Date: Tue, 28 Jan 2014 20:30:28 +0000 (+0100) Subject: NetworkMenu: show the device name instead of Bluetooth X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2827 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ed53a45228014a50c16dd7ed51ad0f3db16301c4;p=gnome-shell.git NetworkMenu: show the device name instead of Bluetooth To distinguish the bluetooth network menu from the bluetooth menu proper, use the device name as the label. Also, replace Connect with "Use as Internet connection" https://bugzilla.gnome.org/show_bug.cgi?id=709353 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 1d6d7c564..696e898cd 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -131,7 +131,7 @@ const NMConnectionItem = new Lang.Class({ _sync: function() { let isActive = this.isActive(); - this.labelItem.label.text = isActive ? _("Turn Off") : _("Connect"); + this.labelItem.label.text = isActive ? _("Turn Off") : this._section.getConnectLabel(); this.switchItem.setToggleState(isActive); this.switchItem.setStatus(this._getStatus()); this.emit('icon-changed'); @@ -223,6 +223,10 @@ const NMConnectionSection = new Lang.Class({ return _("Off"); }, + getConnectLabel: function() { + return _("Connect"); + }, + _hasConnection: function(connection) { return this._connectionItems.has(connection.get_uuid()); }, @@ -566,6 +570,14 @@ const NMDeviceBluetooth = new Lang.Class({ return 'network-cellular-signal-none-symbolic'; }, + _getDescription: function() { + return this._device.name; + }, + + getConnectLabel: function() { + return _("Use as Internet connection"); + }, + getIndicatorIcon: function() { let state = this._device.active_connection.state; if (state == NetworkManager.ActiveConnectionState.ACTIVATING)